/*
 * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved.
 */
#ifndef __COMM_VO_H__
#define __COMM_VO_H__

#include "type.h"
#include "common.h"
#include "comm_video.h"

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif

typedef enum EN_VOU_ERR_CODE_E {
	EN_ERR_VO_DEV_NOT_CONFIG = 0x40,
	EN_ERR_VO_DEV_NOT_ENABLE = 0x41,
	EN_ERR_VO_DEV_HAS_ENABLED = 0x42,
	EN_ERR_VO_DEV_HAS_BINDED = 0x43,
	EN_ERR_VO_DEV_NOT_BINDED = 0x44,

	ERR_VO_NOT_ENABLE = 0x45,
	ERR_VO_NOT_DISABLE = 0x46,
	ERR_VO_NOT_CONFIG = 0x47,

	ERR_VO_CHN_NOT_DISABLE = 0x48,
	ERR_VO_CHN_NOT_ENABLE = 0x49,
	ERR_VO_CHN_NOT_CONFIG = 0x4a,
	ERR_VO_CHN_NOT_ALLOC = 0x4b,

	ERR_VO_CCD_INVALID_PAT = 0x4c,
	ERR_VO_CCD_INVALID_POS = 0x4d,

	ERR_VO_WAIT_TIMEOUT = 0x4e,
	ERR_VO_INVALID_VFRAME = 0x4f,
	ERR_VO_INVALID_RECT_PARA = 0x50,
	ERR_VO_SETBEGIN_ALREADY = 0x51,
	ERR_VO_SETBEGIN_NOTYET = 0x52,
	ERR_VO_SETEND_ALREADY = 0x53,
	ERR_VO_SETEND_NOTYET = 0x54,

	ERR_VO_GRP_INVALID_ID = 0x55,
	ERR_VO_GRP_NOT_CREATE = 0x56,
	ERR_VO_GRP_HAS_CREATED = 0x57,
	ERR_VO_GRP_NOT_DESTROY = 0x58,
	ERR_VO_GRP_CHN_FULL = 0x59,
	ERR_VO_GRP_CHN_EMPTY = 0x5a,
	ERR_VO_GRP_CHN_NOT_EMPTY = 0x5b,
	ERR_VO_GRP_INVALID_SYN_MODE = 0x5c,
	ERR_VO_GRP_INVALID_BASE_PTS = 0x5d,
	ERR_VO_GRP_NOT_START = 0x5e,
	ERR_VO_GRP_NOT_STOP = 0x5f,
	ERR_VO_GRP_INVALID_FRMRATE = 0x60,
	ERR_VO_GRP_CHN_HAS_REG = 0x61,
	ERR_VO_GRP_CHN_NOT_REG = 0x62,
	ERR_VO_GRP_CHN_NOT_UNREG = 0x63,
	ERR_VO_GRP_BASE_NOT_CFG = 0x64,

	ERR_GFX_NOT_DISABLE = 0x65,
	ERR_GFX_NOT_BIND = 0x66,
	ERR_GFX_NOT_UNBIND = 0x67,
	ERR_GFX_INVALID_ID = 0x68,

	ERR_VO_WBC_NOT_DISABLE = 0x69,
	ERR_VO_WBC_NOT_CONFIG = 0x6a,

	ERR_VO_CHN_AREA_OVERLAP = 0x6b,

	EN_ERR_INVALID_WBCID = 0x6c,
	EN_ERR_INVALID_LAYERID = 0x6d,
	EN_ERR_VO_VIDEO_HAS_BINDED = 0x6e,
	EN_ERR_VO_VIDEO_NOT_BINDED = 0x6f,
	ERR_VO_WBC_HAS_BIND = 0x70,
	ERR_VO_WBC_HAS_CONFIG = 0x71,
	ERR_VO_WBC_NOT_BIND = 0x72,

	ERR_VO_BUTT
} EN_VOU_ERR_CODE_E;

#define ERR_CODE_VO_BUSY \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY)
#define ERR_CODE_VO_NO_MEM \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM)
#define ERR_CODE_VO_NULL_PTR \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR)
#define ERR_CODE_VO_SYS_NOTREADY \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY)
#define ERR_CODE_VO_INVALID_DEVID \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_DEVID)
#define ERR_CODE_VO_INVALID_CHNID \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID)
#define ERR_CODE_VO_ILLEGAL_PARAM \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM)
#define ERR_CODE_VO_NOT_SUPPORT \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT)
#define ERR_CODE_VO_NOT_PERMIT \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM)
#define ERR_CODE_VO_INVALID_WBCID \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_WBCID)
#define ERR_CODE_VO_INVALID_LAYERID \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_LAYERID)

#define ERR_CODE_VO_DEV_NOT_CONFIG \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_DEV_NOT_CONFIG)
#define ERR_CODE_VO_DEV_NOT_ENABLE \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_DEV_NOT_ENABLE)
#define ERR_CODE_VO_DEV_HAS_ENABLED                    \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, \
			EN_ERR_VO_DEV_HAS_ENABLED)
#define ERR_CODE_VO_DEV_HAS_BINDED \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_DEV_HAS_BINDED)
#define ERR_CODE_VO_DEV_NOT_BINDED \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_DEV_NOT_BINDED)

#define ERR_CODE_VO_VIDEO_NOT_ENABLE \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_NOT_ENABLE)
#define ERR_CODE_VO_VIDEO_NOT_DISABLE \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_NOT_DISABLE)
#define ERR_CODE_VO_VIDEO_NOT_CONFIG \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_NOT_CONFIG)
#define ERR_CODE_VO_VIDEO_HAS_BINDED                   \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, \
			EN_ERR_VO_VIDEO_HAS_BINDED)
#define ERR_CODE_VO_VIDEO_NOT_BINDED                   \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, \
			EN_ERR_VO_VIDEO_NOT_BINDED)

#define ERR_CODE_VO_WBC_NOT_DISABLE \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WBC_NOT_DISABLE)
#define ERR_CODE_VO_WBC_NOT_CONFIG \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WBC_NOT_CONFIG)
#define ERR_CODE_VO_WBC_HAS_CONFIG \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WBC_HAS_CONFIG)
#define ERR_CODE_VO_WBC_NOT_BIND \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WBC_NOT_BIND)
#define ERR_CODE_VO_WBC_HAS_BIND \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WBC_HAS_BIND)

#define ERR_CODE_VO_CHN_NOT_DISABLE \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CHN_NOT_DISABLE)
#define ERR_CODE_VO_CHN_NOT_ENABLE \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CHN_NOT_ENABLE)
#define ERR_CODE_VO_CHN_NOT_CONFIG \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CHN_NOT_CONFIG)
#define ERR_CODE_VO_CHN_NOT_ALLOC \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CHN_NOT_ALLOC)
#define ERR_CODE_VO_CHN_AREA_OVERLAP \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CHN_AREA_OVERLAP)

#define ERR_CODE_VO_INVALID_PATTERN \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CCD_INVALID_PAT)
#define ERR_CODE_VO_INVALID_POSITION \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CCD_INVALID_POS)

#define ERR_CODE_VO_WAIT_TIMEOUT \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WAIT_TIMEOUT)
#define ERR_CODE_VO_INVALID_VFRAME \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_INVALID_VFRAME)
#define ERR_CODE_VO_INVALID_RECT_PARA \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_INVALID_RECT_PARA)
#define ERR_CODE_VO_SETBEGIN_ALREADY \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_SETBEGIN_ALREADY)
#define ERR_CODE_VO_SETBEGIN_NOTYET \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_SETBEGIN_NOTYET)
#define ERR_CODE_VO_SETEND_ALREADY \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_SETEND_ALREADY)
#define ERR_CODE_VO_SETEND_NOTYET \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_SETEND_NOTYET)

#define ERR_CODE_VO_GRP_INVALID_ID \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_INVALID_ID)
#define ERR_CODE_VO_GRP_NOT_CREATE \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_NOT_CREATE)
#define ERR_CODE_VO_GRP_HAS_CREATED \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_HAS_CREATED)
#define ERR_CODE_VO_GRP_NOT_DESTROY \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_NOT_DESTROY)
#define ERR_CODE_VO_GRP_CHN_FULL \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_FULL)
#define ERR_CODE_VO_GRP_CHN_EMPTY \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_EMPTY)
#define ERR_CODE_VO_GRP_CHN_NOT_EMPTY \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_NOT_EMPTY)
#define ERR_CODE_VO_GRP_INVALID_SYN_MODE               \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, \
			ERR_VO_GRP_INVALID_SYN_MODE)
#define ERR_CODE_VO_GRP_INVALID_BASE_PTS               \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, \
			ERR_VO_GRP_INVALID_BASE_PTS)
#define ERR_CODE_VO_GRP_NOT_START \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_NOT_START)
#define ERR_CODE_VO_GRP_NOT_STOP \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_NOT_STOP)
#define ERR_CODE_VO_GRP_INVALID_FRMRATE                \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, \
			ERR_VO_GRP_INVALID_FRMRATE)
#define ERR_CODE_VO_GRP_CHN_HAS_REG \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_HAS_REG)
#define ERR_CODE_VO_GRP_CHN_NOT_REG \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_NOT_REG)
#define ERR_CODE_VO_GRP_CHN_NOT_UNREG \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_NOT_UNREG)
#define ERR_CODE_VO_GRP_BASE_NOT_CFG \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_BASE_NOT_CFG)

#define ERR_CODE_VO_GFX_NOT_DISABLE \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_GFX_NOT_DISABLE)
#define ERR_CODE_VO_GFX_NOT_BIND \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_GFX_NOT_BIND)
#define ERR_CODE_VO_GFX_NOT_UNBIND \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_GFX_NOT_UNBIND)
#define ERR_CODE_VO_GFX_INVALID_ID \
	DEFINE_ERR_CODE(MOD_ID_VO, EN_ERR_LEVEL_ERROR, ERR_GFX_INVALID_ID)

#define VO_INTF_CVBS (0x01L << 0)
#define VO_INTF_YPBPR (0x01L << 1)
#define VO_INTF_VGA (0x01L << 2)
#define VO_INTF_BT656 (0x01L << 3)
#define VO_INTF_BT1120 (0x01L << 4)
#define VO_INTF_HDMI (0x01L << 5)
#define VO_INTF_LCD (0x01L << 6)
#define VO_INTF_BT656_H (0x01L << 7)
#define VO_INTF_BT656_L (0x01L << 8)
#define VO_INTF_LCD_6BIT (0x01L << 9)
#define VO_INTF_LCD_8BIT (0x01L << 10)
#define VO_INTF_LCD_16BIT (0x01L << 11)
#define VO_INTF_LCD_18BIT (0x01L << 12)
#define VO_INTF_LCD_24BIT (0x01L << 13)
#define VO_INTF_MIPI (0x01L << 14)
#define VO_INTF_MIPI_SLAVE (0x01L << 15)

typedef GK_U32 VO_INTF_TYPE_E;

typedef enum VO_INTF_SYNC_E {
	VO_OUTPUT_PAL = 0,
	VO_OUTPUT_NTSC,

	VO_OUTPUT_1080P24,
	VO_OUTPUT_1080P25,
	VO_OUTPUT_1080P30,

	VO_OUTPUT_720P50,
	VO_OUTPUT_720P60,
	VO_OUTPUT_1080I50,
	VO_OUTPUT_1080I60,
	VO_OUTPUT_1080P50,
	VO_OUTPUT_1080P60,

	VO_OUTPUT_576P50,
	VO_OUTPUT_480P60,

	VO_OUTPUT_800x600_60,
	VO_OUTPUT_1024x768_60,
	VO_OUTPUT_1280x1024_60,
	VO_OUTPUT_1366x768_60,
	VO_OUTPUT_1440x900_60,
	VO_OUTPUT_1280x800_60,
	VO_OUTPUT_1600x1200_60,
	VO_OUTPUT_1680x1050_60,
	VO_OUTPUT_1920x1200_60,
	VO_OUTPUT_640x480_60,
	VO_OUTPUT_960H_PAL,
	VO_OUTPUT_960H_NTSC,
	VO_OUTPUT_1920x2160_30,
	VO_OUTPUT_2560x1440_30,
	VO_OUTPUT_2560x1440_60,
	VO_OUTPUT_2560x1600_60,
	VO_OUTPUT_3840x2160_24,
	VO_OUTPUT_3840x2160_25,
	VO_OUTPUT_3840x2160_30,
	VO_OUTPUT_3840x2160_50,
	VO_OUTPUT_3840x2160_60,
	VO_OUTPUT_4096x2160_24,
	VO_OUTPUT_4096x2160_25,
	VO_OUTPUT_4096x2160_30,
	VO_OUTPUT_4096x2160_50,
	VO_OUTPUT_4096x2160_60,
	VO_OUTPUT_320x240_60,
	VO_OUTPUT_320x240_50,
	VO_OUTPUT_240x320_50,
	VO_OUTPUT_240x320_60,
	VO_OUTPUT_800x600_50,
	VO_OUTPUT_720x1280_60,
	VO_OUTPUT_1080x1920_60,
	VO_OUTPUT_7680x4320_30,
	VO_OUTPUT_USER,

	VO_OUTPUT_BUTT
} VO_INTF_SYNC_E;

typedef enum VO_ZOOM_IN_E {
	VO_ZOOM_IN_RECT = 0,
	VO_ZOOM_IN_RATIO,
	VO_ZOOM_IN_BUTT
} VO_ZOOM_IN_E;

typedef enum VO_CSC_MATRIX_E {
	VO_CSC_MATRIX_IDENTITY = 0,

	VO_CSC_MATRIX_BT601_TO_BT709,
	VO_CSC_MATRIX_BT709_TO_BT601,

	VO_CSC_MATRIX_BT601_TO_RGB_PC,
	VO_CSC_MATRIX_BT709_TO_RGB_PC,

	VO_CSC_MATRIX_RGB_TO_BT601_PC,
	VO_CSC_MATRIX_RGB_TO_BT709_PC,

	VO_CSC_MATRIX_RGB_TO_BT2020_PC,
	VO_CSC_MATRIX_BT2020_TO_RGB_PC,

	VO_CSC_MATRIX_RGB_TO_BT601_TV,
	VO_CSC_MATRIX_RGB_TO_BT709_TV,

	VO_CSC_MATRIX_BUTT
} VO_CSC_MATRIX_E;

typedef struct VO_CHN_ATTR_S {
	GK_U32 u32Priority;
	RECT_S stRect;
	GK_BOOL bDeflicker;
} VO_CHN_ATTR_S;

typedef struct VO_CHN_PARAM_S {
	ASPECT_RATIO_S stAspectRatio;
} VO_CHN_PARAM_S;

typedef struct VO_BORDER_S {
	GK_BOOL bBorderEn;
	BORDER_S stBorder;
} VO_BORDER_S;

typedef struct VO_QUERY_STATUS_S {
	GK_U32 u32ChnBufUsed;
} VO_QUERY_STATUS_S;

typedef struct VO_SYNC_INFO_S {
	GK_BOOL bSynm;
	GK_BOOL bIop;
	GK_U8 u8Intfb;

	GK_U16 u16Vact;
	GK_U16 u16Vbb;
	GK_U16 u16Vfb;

	GK_U16 u16Hact;
	GK_U16 u16Hbb;
	GK_U16 u16Hfb;
	GK_U16 u16Hmid;

	GK_U16 u16Bvact;
	GK_U16 u16Bvbb;
	GK_U16 u16Bvfb;

	GK_U16 u16Hpw;
	GK_U16 u16Vpw;

	GK_BOOL bIdv;
	GK_BOOL bIhs;
	GK_BOOL bIvs;
} VO_SYNC_INFO_S;

typedef struct VO_PUB_ATTR_S {
	GK_U32 u32BgColor;
	VO_INTF_TYPE_E enIntfType;
	VO_INTF_SYNC_E enIntfSync;
	VO_SYNC_INFO_S stSyncInfo;
} VO_PUB_ATTR_S;

typedef struct VO_WBC_ATTR_S {
	SIZE_S stTargetSize;
	PIXEL_FORMAT_E enPixelFormat;
	GK_U32 u32FrameRate;
	DYNAMIC_RANGE_E enDynamicRange;
	COMPRESS_MODE_E enCompressMode;
} VO_WBC_ATTR_S;

typedef enum VO_WBC_MODE_E {
	VO_WBC_MODE_NORMAL = 0,
	VO_WBC_MODE_DROP_REPEAT,
	VO_WBC_MODE_PROG_TO_INTL,
	VO_WBC_MODE_BUTT,
} VO_WBC_MODE_E;

typedef enum VO_WBC_SOURCE_TYPE_E {
	VO_WBC_SOURCE_DEV = 0x0,
	VO_WBC_SOURCE_VIDEO = 0x1,
	VO_WBC_SOURCE_GRAPHIC = 0x2,
	VO_WBC_SOURCE_BUTT
} VO_WBC_SOURCE_TYPE_E;

typedef struct VO_WBC_SOURCE_S {
	VO_WBC_SOURCE_TYPE_E enSourceType;
	GK_U32 u32SourceId;
} VO_WBC_SOURCE_S;

typedef enum VO_PART_MODE_E {
	VO_PART_MODE_SINGLE = 0,
	VO_PART_MODE_MULTI = 1,
	VO_PART_MODE_BUTT
} VO_PART_MODE_E;

typedef struct VO_VIDEO_LAYER_ATTR_S {
	RECT_S stDispRect;
	SIZE_S stImageSize;
	GK_U32 u32DispFrmRt;
	PIXEL_FORMAT_E enPixFormat;
	GK_BOOL bDoubleFrame;
	GK_BOOL bClusterMode;
	DYNAMIC_RANGE_E enDstDynamicRange;
} VO_VIDEO_LAYER_ATTR_S;

typedef struct VO_LAYER_PARAM_S {
	ASPECT_RATIO_S stAspectRatio;
} VO_LAYER_PARAM_S;

typedef struct VO_ZOOM_RATIO_S {
	GK_U32 u32XRatio;
	GK_U32 u32YRatio;
	GK_U32 u32WRatio;
	GK_U32 u32HRatio;
} VO_ZOOM_RATIO_S;

typedef struct VO_ZOOM_ATTR_S {
	VO_ZOOM_IN_E enZoomType;
	union {
		RECT_S stZoomRect;
		VO_ZOOM_RATIO_S stZoomRatio;
	};
} VO_ZOOM_ATTR_S;

typedef struct VO_CSC_S {
	VO_CSC_MATRIX_E enCscMatrix;
	GK_U32 u32Luma;
	GK_U32 u32Contrast;
	GK_U32 u32Hue;
	GK_U32 u32Satuature;
} VO_CSC_S;

typedef struct VO_REGION_INFO_S {
	GK_U32 u32RegionNum;
	RECT_S *ATTRIBUTE pstRegion;
} VO_REGION_INFO_S;

typedef struct VO_LAYER_BOUNDARY_S {
	GK_U32 u32Width;
	GK_U32 u32Color[2];
} VO_LAYER_BOUNDARY_S;

typedef struct VO_CHN_BOUNDARY_S {
	GK_BOOL bBoundaryEn;
	GK_U32 u32ColorIndex;
} VO_CHN_BOUNDARY_S;

typedef struct VO_MOD_PARAM_S {
	GK_BOOL bTransparentTransmit;
	GK_BOOL bExitDev;
	GK_BOOL bWbcBgBlackEn;
	GK_BOOL bDevClkExtEn;
	GK_BOOL bSaveBufMode[VO_MAX_PHY_DEV_NUM];
} VO_MOD_PARAM_S;

typedef enum VO_CLK_SOURCE_E {
	VO_CLK_SOURCE_PLL,
	VO_CLK_SOURCE_LCDMCLK,

	VO_CLK_SOURCE_BUTT
} VO_CLK_SOURCE_E;

typedef struct VO_USER_INTFSYNC_PLL_S {
	GK_U32 u32Fbdiv;
	GK_U32 u32Frac;
	GK_U32 u32Refdiv;
	GK_U32 u32Postdiv1;
	GK_U32 u32Postdiv2;
} VO_USER_INTFSYNC_PLL_S;

typedef struct VO_USER_INTFSYNC_ATTR_S {
	VO_CLK_SOURCE_E enClkSource;

	union {
		VO_USER_INTFSYNC_PLL_S stUserSyncPll;
		GK_U32 u32LcdMClkDiv;
	};
} VO_USER_INTFSYNC_ATTR_S;

typedef struct VO_USER_INTFSYNC_INFO_S {
	VO_USER_INTFSYNC_ATTR_S stUserIntfSyncAttr;
	GK_U32 u32PreDiv;
	GK_U32 u32DevDiv;
	GK_BOOL bClkReverse;
} VO_USER_INTFSYNC_INFO_S;

typedef enum VO_MIRROR_MODE_E {
	VO_MIRROR_NONE = 0,
	VO_MIRROR_HOR,
	VO_MIRROR_BUTT
} VO_MIRROR_MODE_E;

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif

#endif
